﻿<%@ Page Language="C#" MasterPageFile="~/CmsMaster.Master" AutoEventWireup="true" CodeBehind="ReportTimesheet.aspx.cs" Inherits="ContractManagementSystem.Presentation.ReportManagement.ReportTimesheet" Title="Report >> Timesheet" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="../../Styles/ClientStyle.css"/>
    
    <script type = "text/javascript" language = "javascript" src = "../../JavaScript/JsLibrary.js"></script>    
    <script type = "text/javascript" language = "javascript" src = "../../JavaScript/jquery.js"></script>
    <script type = "text/javascript" language = "javascript" src = "../../JavaScript/menu.js"></script>
    
    <link href="../../JavaScript/validationEngine/css/jquery-ui-1.8.21.custom.css" rel="stylesheet"
        type="text/css" />
    <script src="../../JavaScript/validationEngine/js/jquery-ui-1.8.21.custom.min.js"
        type="text/javascript"></script>
    
    <script type="text/javascript">
        $.datepicker.formatDate("MM/dd/yyyy");
        $(document).ready(function(){
               $(".inp-datetime").datepicker();
       });
    </script>
    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" runat="server">
    <div class="CPF">
        <div class="CPFSearch">
            <table>
                <tr>
                    <td>
                        <asp:Label runat="server" >Contract:</asp:Label>
                    </td>
                    
                    <td>
                        <asp:DropDownList ID="DropDownListContractTitle" runat="server" 
                            CssClass="CPFdropDowlist" Height="20px" Width="150px" />
                    </td>
                    <td></td>
                    <td>
                        <asp:Label runat="server">From date:</asp:Label>
                    </td>
                    <td>
                        <asp:TextBox runat="server" ID="textFromDate" CssClass="inp-datetime" Height="20px" Width="100px"/>
                    </td>
                    <td></td>
                    <td><td>
                    <td>Format date:</td>
                    <td style="color: #A3A300;font-weight: bold;">mm /dd /yyyy</td>
                </tr>
                <tr>            
                    <td>
                        <asp:Label ID="Label2" runat="server" >Status:</asp:Label>
                    </td>
                    <td>
                        <asp:DropDownList ID="DropDownListStatus" runat="server" 
                            CssClass="CPFdropDowlist" Height="20px" Width="150px"  >
                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem>Pending</asp:ListItem>
                            <asp:ListItem>Approveđ</asp:ListItem>
                            <asp:ListItem>Rejected</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td></td>
                    <td>
                        <asp:Label ID="Label1" runat="server">To date:</asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="textToDate" runat="server" CssClass="inp-datetime" Height="20px" Width="100px"/>
                    </td>
                    <td></td>
                    <td></td>
                    <td>
                        <asp:Button runat="server" Text="Search" ID="ButtonSearch" 
                                    CssClass="CPFButton1" onclick="ButtonSearchClick"/>
                    </td>
                    <td>
                        <asp:Button runat="server" Text="Create Report" ID="CreateButtonReport" 
                                    CssClass="CPFButton1" Width="95px" onclick="CreateButtonReportClick"/>
                    </td>
                </tr>
            </table>
        </div>
        
        <div class="CPFGrid">
            <asp:ListView ID="ListViewTimesheet" runat="server" >
                <LayoutTemplate>
                    <table class="repeaterTable" >
                        <tr class="tableHeader" >
                            <td>Contractor</td>
                            <th >Contract Number</th>  
                            <th >Date</th>                                                           
                            <th >Time</th>
                            <th >Description</th>
                            <th >Status</th>
                        </tr>
                    
                        <tr id="itemPlaceholder" runat="server"></tr>           
                           
                    </table>
                   <table class="CPFrepeaterTable" >
                        <tr class="CPFtableHeader" >
                        <td class="CPFPage">
                        <asp:DataPager runat="server" ID="ItemDataPager" PageSize="10">
                            <Fields>
                                <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowNextPageButton="false" ButtonCssClass="CPFNumPage"/>
                                <asp:NumericPagerField ButtonCount="5"  CurrentPageLabelCssClass="CPFCurrentNumPage" NumericButtonCssClass="CPFNumPage"/>
                                <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="false" ButtonCssClass="CPFNumPage"/>
                            </Fields>                    
                        </asp:DataPager>      
                        </td>          
                    </tr>
                    </table> 
                </LayoutTemplate>
                <ItemTemplate>

                    <tr class="CPFTr">
                        <td class="CPFtd" style="width:60px;"><asp:Label ID="lebelUserName" runat="server"><%#Eval("UserName")%></asp:Label></td>
                        <td class="CPFtd" style="width: 40px;"><asp:Label ID="labelAddress" runat="server"><%#DataBinder.Eval(Container.DataItem, "ContractNumber")%></asp:Label></td>                        
                        <td class="CPFtd" style="width: 30px; text-align: center;"><asp:Label ID="labelOnDate" runat="server"><%#Eval("OnDate","{0:MM/dd/yyyy}")%></asp:Label></td>
                        <td class="CPFtd" style="width: 10px;text-align: center;"><asp:Label ID="labelTime" runat="server"><%#DataBinder.Eval(Container.DataItem, "Time")%></asp:Label></td>
                        <td class="CPFtd" style="width: 270px;"><asp:Label ID="labelEmail" runat="server"><%#DataBinder.Eval(Container.DataItem, "Description")%></asp:Label></td>
                        <td class="CPFtd" style="width: 60px;"><asp:Label ID="label3" runat="server"><%#DataBinder.Eval(Container.DataItem, "Status")%></asp:Label></td>
                    </tr> 
            
                </ItemTemplate>            
            </asp:ListView>
        
        </div>
        
        <div class="CPFResultsSearch">
            <asp:Label runat="server" ID="labelResultSearch"></asp:Label>
        </div>          
    </div> 
</asp:Content>